/**
 * 重置radio单选按钮选中
 * @author 叶城廷
 */
function radioSelect(){
var radioSelect=document.getElementsByName("select_method");
var selectButton=document.getElementById("selectButton").value;
//判断Action反馈重置按钮信息
if(selectButton=="method_mouth"){
     radioSelect[0].checked =false;   
     radioSelect[1].checked =true;   
    }else if(selectButton=="method_year"){  
           radioSelect[0].checked =false;   
           radioSelect[2].checked =true;  
    }else if(selectButton=="method_time"){
              radioSelect[0].checked =false;   
              radioSelect[3].checked =true;  
      }else{}
      }      
/**
 * 搜索-提交form表单检查
 * @author 叶城廷
 */
function selectCheck(){
	
	  var page=document.getElementById("page").value;
      var radioSelect=document.getElementsByName("select_method");
      //按天查询表单 
      if(radioSelect[0].checked){
         var selectDay_year=document.getElementById("selectDay_year").value;   
          var selectDay_mouth=document.getElementById("selectDay_mouth").value;
           var selectDay_days=document.getElementById("selectDay_days").value;
            var select_total=selectDay_year+"-"+selectDay_mouth+"-"+selectDay_days;
               this.select_from.action="StatisticsAction_queryDate.action?select_total="+select_total+"&selectButton=method_day"+"&resetYear="+selectDay_year+"&resetMonth="+selectDay_mouth+"&resetDay="+selectDay_days;
                   this.select_from.submit();
      }
      //按月查询表单
      else if(radioSelect[1].checked){    
        var selectMonth_year=document.getElementById("selectMonth_year").value;
          var selectMonth_month=document.getElementById("selectMonth_month").value;     
            var select_total=selectMonth_year+"-"+selectMonth_month;
                this.select_from.action="StatisticsAction_queryDate.action?select_total="+select_total+"&selectButton=method_mouth"+"&resetYear="+selectMonth_year+"&resetMonth="+selectMonth_month;
                   this.select_from.submit();
      }    
      //按年查询表单
       else  if(radioSelect[2].checked){
         var selectYear_year=document.getElementById("selectYear_year").value;   
            var select_total=selectYear_year;
               this.select_from.action="StatisticsAction_queryDate.action?select_total="+select_total+"&selectButton=method_year"+"&resetYear="+selectYear_year+"&page="+page;
                   this.select_from.submit();
      }
      //按时间段查询表单
       else  if(radioSelect[3].checked){
         var selectTime_startTime_hour=document.getElementById("selectTime_startTime_hour").value;
          var selectTime_startTime_minutes=document.getElementById("selectTime_startTime_minutes").value;
           var selectTime_endTime_hour=document.getElementById("selectTime_endTime_hour").value;
             var selectTime_endTime_minutes=document.getElementById("selectTime_endTime_minutes").value;
              var startTime=selectTime_startTime_hour*60*60+selectTime_startTime_minutes*60;
                var endTime=selectTime_endTime_hour*60*60+selectTime_endTime_minutes*60;
                  this.select_from.action="StatisticsAction_queryTime.action?startTime="+startTime+"&endTime="+endTime+"&selectButton=method_time"+"&page="+page;
                    this.select_from.submit();
      }
    }
      
//页面加载检查      @author 叶城廷
      window.onload=function(){
    	  var day=new Date();
    	  var newyear=day.getFullYear();
    	  //获取Action反馈重置日期信息
    	  var resetYear=document.getElementById("resetYear").value;
    	  var resetMonth=document.getElementById("resetMonth").value;
    	  var resetDay=document.getElementById("resetDay").value;
    	  
    	  //按日查询按钮
    	  var selectDay_year=document.getElementById("selectDay_year");
    	  var selectDay_mouth=document.getElementById("selectDay_mouth");
    	  var selectDay_days=document.getElementById("selectDay_days");
    	     for(var i=newyear;i>=2000;i--){
    	  selectDay_year.add(new Option(i,i),null);
    	  }
    	     for(var i=1;i<=12;i++){
    	      if(i<10){ 
    	       i="0"+i;
    	     }
    	  selectDay_mouth.add(new Option(i,i),null);
    	  }
    	  for(var i=1;i<=31;i++){
    	   if(i<10){ 
    	       i="0"+i;
    	     }
    	   selectDay_days.add(new Option(i,i),null);
    	  }
    	  //初始化或重置日期
    	  selectDay_year.value=resetYear;
    	  selectDay_mouth.value=resetMonth;
    	  selectDay_days.value=resetDay;
    	   //按月查询按钮
    	  var selectMonth_year=document.getElementById("selectMonth_year");
    	  var selectMonth_month=document.getElementById("selectMonth_month");
    	  
    	      for(var i=newyear;i>=2000;i--){
    	  selectMonth_year.add(new Option(i,i),null);
    	  }
    	     for(var i=1;i<=12;i++){
    	     if(i<10){ 
    	       i="0"+i;
    	     }
    	    selectMonth_month.add(new Option(i,i),null);
    	  }
    	     //初始化或重置日期
    	     selectMonth_year.value=resetYear;
    	     selectMonth_month.value=resetMonth;
    	  //按年查询按钮
    	  var selectYear_year=document.getElementById("selectYear_year");
    	  
    	       for(var i=newyear;i>=2000;i--){
    	  selectYear_year.add(new Option(i,i),null);
    	  }
    	   //初始化或重置日期
    	   selectYear_year.value=resetYear;
    	  //按时间段查询按钮
    	  var selectTime_startTime_season=document.getElementById("selectTime_startTime_hour");
    	  var selectTime_startTime_minutes=document.getElementById("selectTime_startTime_minutes");
    	  var selectTime_endTime_season=document.getElementById("selectTime_endTime_hour");
    	  var selectTime_endTime_minutes=document.getElementById("selectTime_endTime_minutes");

    	    for(var i=0;i<=24;i++){
    	  selectTime_startTime_hour.add(new Option(i,i),null);
    	  }
    	  
    	   for(var i=0;i<=59;i++){
    	  selectTime_startTime_minutes.add(new Option(i,i),null);
    	  }
    	  
    	    for(var i=24;i>=0;i--){
    	  selectTime_endTime_hour.add(new Option(i,i),null);
    	  }
    	  
    	   for(var i=0;i<=59;i++){
    	  selectTime_endTime_minutes.add(new Option(i,i),null);
    	  }
      }
     
      